#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int a = 0;
	scanf("%d", &a);
	int num = a;
	int count = 0;

	while (num)
	{
		if (num % 2 == 1)
		{
			count++;
		}
		num >>= 1;
	}
	printf("%d", count);
	return 0;
}